package main

type TreeNode struct {
	Val   int
	Left  *TreeNode
	Right *TreeNode
}

func insert(ele int, tree *TreeNode, deep *int) int {
	if(*deep ==0){
		ele = tree.Val
		return -1
	}
	if(tree.Left==nil){
		tree.Left.Val = ele
		return -1
	}
	if(tree.Right==nil){
		tree.Right.Val = ele
		*deep = *deep +1
		return *deep
	}
	insert(ele,tree,deep)
	return *deep
}
func main() {
	a :=TreeNode{
		Val:   0,
		Left:  nil,
		Right: nil,
	}
	maxDepth(&a)
}

func maxDepth(root *TreeNode) int {
	primes := []int{3, 9, 20, nil, nil, 15, 7}
	var result int
	for _, v := range primes {
		insert(v, root, &result)
	}

	return 0
}
